const path = require('path');
const fs = require('fs');
const base = path.join(__dirname, '../node_modules/react-native-vector-icons');
const files = ['lib/object-utils.js', 'dist/lib/object-utils.js'];

files.forEach(function (file) {
  const f = path.join(base, file);
  const data = fs.readFileSync(f).toString();
  const newData = data.replace(
    /module\.exports[^}]+\}/g,
    'export {pick, omit}',
  );
  fs.writeFileSync(f, newData);
});
